" Vim syntax file
" Language: Memo

if exists("b:current_syntax")
  finish
endif

syn match   memoComment     "#.*$" contains=memoTodo,@Spell
syn region  memoComment     matchgroup=memoComments
            \ start=+[uU]\=\z([|]\)+ end="\z1" skip="\\\\\|\\\z1"
            \ contains=memoEscape,@Spell
syn region  memoString      matchgroup=memoQuotes
            \ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
            \ contains=memoEscape,@Spell
syn match   memoEscape      "\\x\x\{2}" contained

syn match   memoNumber      "\<\(\d*\)\>"
syn match   memoNumber      "\<\%([1-9]\%(_\=\d\)*\|0\+\%(_\=0\)*\)\>"
syn match   memoNumber
            \ "\%(^\|\W\)\zs\%(\d\%(_\=\d\)*\)\=\.\d\%(_\=\d\)*\%([eE][+-]\=\d\%(_\=\d\)*\)\=[jJ]\=\>"

syn match   Float           "L\d*[_0-9a-zA-Z]*"

syn keyword memoKey1         NA NO No Note attention false imp important later note notice og ongoing 参考点 已总结 未总结 注 注意 详见专题
syn keyword memoKey2         Figure abort cancelledtodo cxtodo discussed done donetodo duplicated figure formula movedtodo no nomoretodo noneed notnow open pause pic 公式 图
syn match   memoKey3        "\.\.\."
syn match   memoKey3        ">>>"
syn match   memoKey3        "?"
syn keyword memoKey3        digest failedtodo nouse ogtodo ongoingtodo torephrase torfz
syn keyword memoKey4        delayed_todo detodo todo TODO
syn match   memoBlockComment        "\(⠇.*⠇\)"

hi def link memoComment             Comment
hi def link memoString              String
hi def link memoQuotes              String
hi def link memoNumber              Number

hi memoKey1                         guifg=#C1252D guibg=#D6D823
hi memoKey2                         guifg=#AA8000
hi memoKey3                         guifg=#12C2D2
hi memoKey4                         guifg=#D7DCE3 guibg=#BC42DE

hi memoBlockComment                 guifg=#B7659C guibg=#F1ECEE
hi memoComment                      guifg=#E13E3F
hi memoQuotes                       guifg=#1CB01C
hi memoString                       guifg=#1CB01C
hi memoNumber                       guifg=#F971BB

let b:current_syntax = "memo"

